package com.lenovo.newsapp.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.lenovo.newsapp.R;
import com.lenovo.newsapp.fragment.GalleriesListFragment;

/**
 * 左右抽屉菜单工厂类
 * 
 */
public class SectionFactory {
	private static SectionFactory sectionConfig = null;
	private static List<HashMap<String, Object>> sections;
	private static List<HashMap<String, Object>> rightMenu;

	private SectionFactory() {
		/**
		 * 左侧划出菜单
		 */
		sections = new ArrayList<HashMap<String, Object>>();

		HashMap<String, Object> map = new HashMap<String, Object>();
		map.put("id", 0);
		map.put("title", "首页");
		map.put("imgSourceId", R.drawable.home_page);
		// map.put("view", HomePageTabHost.class);
		map.put("view", GalleriesListFragment.class);
		sections.add(map);

		map = new HashMap<String, Object>();
		map.put("id", 1);
		map.put("title", "图片");
		map.put("imgSourceId", R.drawable.galleries);
		// map.put("view", ViewPointTabHost.class);
		map.put("view", GalleriesListFragment.class);
		sections.add(map);

		map = new HashMap<String, Object>();
		map.put("id", 2);
		map.put("title", "视频");
		map.put("imgSourceId", R.drawable.video);
		// map.put("view", ViewPointTabHost.class);
		map.put("view", GalleriesListFragment.class);
		sections.add(map);


	}

	public static SectionFactory getInstance() {
		if (sectionConfig == null) {
			sectionConfig = new SectionFactory();
		}

		return sectionConfig;
	}

	public List<HashMap<String, Object>> getSections() {
		return sections;
	}

}
